<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>css处理节点</title>
  <script src="js/jquery-3.7.1.min.js"></script>
  <script type="text/javascript">
    $(function () {
      $("#b1").click(function () {
        var $img = $("img");
        console.log("image's width is " + $img.width());
        console.log("image's top is " + $img.offset().top);
        console.log("image's left is " + $img.offset().left);
      })
    })
  </script>
</head>
<body>
<br/><br/><br/>
hello world!<img src="icon.png" width="200px">
<button id="b1">获得图片信息</button>
</body>
</html>
